package com.example;

import com.example.controller.MyController;
import com.example.knight.impl2.BraveKnight;
import com.example.minstrel.Minstrel;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        MyController controller = (MyController) context.getBean("myController");
        controller.doSomething();

        BraveKnight knight = (BraveKnight) context.getBean("knight");
        knight.embarkOnQuest();

        Minstrel minstrel = (Minstrel) context.getBean("minstrel");
        minstrel.singAfterQuest();

        
    }
}
